{% import "juice/templates/_macros.html" as macros %}
{% extends "index.html" %}

{% block title %}{{ section.title }} | {{ super() }} {% endblock title %}

{% block head %}
{% block rss %}
  <link rel="alternate" type="application/atom+xml" title="RSS" href="{{ get_url(path="atom.xml", trailing_slash=false) }}">
{% endblock %}
{% endblock head %}

{% block header %}
<header class="box-shadow">
    {{ macros::render_header() }}
</header>
{% endblock header %}

{% block toc %}
<div class="toc">
    <h2 class="toc-item"><a href="/atom.xml">Subscribe</a></h2>
    <div class="toc-sticky">
        {% for post in section.pages %}
        <div class="toc-item">
            <a class="subtext" href="{{post.permalink | safe}}">{{ post.title }}</a>
        </div>
        {% endfor %}
    </div>
</div>
{% endblock toc %}

{% block content %}
<div class="heading-text">{{ section.description }}</div>
{{ section.content | safe }}

{% for post in section.pages %}
<h1><a href="{{ post.permalink }}">{{ post.title }}</a></h1>
<p class="subtext">{{ post.description }}</p>
{% endfor %}

{% endblock content %}
